Thực đơn
Wikipedia:Phân loại trang đổi hướng Làm sao để phân loại đổi hướngA redirect may be categorized in the same way as for any other page; however, when it is possible to use redirect category templates (rcats), then these should be used. For clarity, all category links should be added at the end of the page on their own lines, after the redirect target link and rcat(s). Use of a blank line between the redirect target link and all rcats and category links promotes readability of the code.
#REDIRECT [[Xxy Yzz]]{{Redirect category shell|{{R from move}}{{R printworthy}}}}{{DEFAULTSORT:Yzz, Xxy}}[[Category:Aaa]]
The <nowiki>#REDIRECT [[Article title]]</nowiki>
must come first, on the top line, and must start from the left margin. <nowiki>[[Category:...]]</nowiki>
-type links may be placed on their own lines after the redirect target link. Redirect category (rcat) templates, <nowiki>{{R from...}}, {{R to ...}}</nowiki>
, etc., the {{Redirect category shell}} (Rcat shell) template may be placed anywhere after the redirect on another line or lines, preferably the third line for readability. Those are usually placed before (above) content categories and empty lines are left between the types for readability.
The <nowiki>{{DEFAULTSORT:}}</nowiki>
magic word can also be placed on redirects, for example, to ensure that a redirect title that begins with a person's given name will be sorted to their surname: <nowiki>{{DEFAULTSORT:Sprat, Jack}}</nowiki>
The {{Redirect category shell}} (Rcat shell) template may be used to group redirect categories. That template automatically senses protection levels and promotes a faster learning curve for new editors. See its documentation page and the comparison page for more information.
The redirect will appear in the specified categories in a style format that is different than non-redirects (by default, redirects appear in italics type, while non-redirects do not – see Technical note below).
Further examples |
---|
Example 1– a redirect that targets page Xxy Yzz, which uses the {{R from former name}} and {{R printworthy}} rcats, and which is also sorted to article content categories Aaa and Bbb, may appear as follows:#REDIRECT [[Xxy Yzz]]{{Rcat shell|{{R from former name}}{{R printworthy}}}}{{DEFAULTSORT:Yzz, Xxy}}[[Category:Aaa]][[Category:Bbb]]When the title being redirected is a person's proper name, consensus is to modify the sort key from its default action, (usually sorted by <nowiki>{{PAGENAME}}</nowiki> , the redirect title in this case), to instead sort it by surname. The <nowiki>{{DEFAULTSORT:}}</nowiki> behaviour switch is used for this; for example, on the edit page of the George Walker Bush redirect, use <nowiki>{{DEFAULTSORT:Bush, George Walker}}</nowiki> , so that the page will appear alphabetized in the B's and not the G's of the various categories. Similarly, for titles beginning with a definite or indefinite article, such as "the" or "a" – for example in redirect The President of the United States, use <nowiki>{{DEFAULTSORT:President of the United States, The}}</nowiki> , so that the page will appear alphabetically in the P's (see Wikipedia:Categorization of people#Ordering names in a category for more information). As with non-redirect pages, it should be positioned immediately before the article content categories:For the Bruce Jenner redirect:#REDIRECT [[Caitlyn Jenner]]{{Rcat shell|{{R from birth name}}{{R printworthy}}}}{{DEFAULTSORT:Jenner, Bruce}}[[Category:Athletes (track and field) at the 1975 Pan American Games]][[Category:Athletes (track and field) at the 1976 Summer Olympics]]Category:Redirects from birth names is a subcategory of Category:Redirects from former names. Normally, the most specific subcategory is used on redirects rather than their parent categories.Example 2– a redirect to an article subsection titled "Header": #REDIRECT [[Xxy Yzz#Header]]{{Redirect category shell|{{R to section}}{{R printworthy}}}}also, when the above shell template is used, all its contents can be entered on one line as follows: #REDIRECT [[Xxy Yzz#Header]]{{Redirect category shell|{{R to section}}{{R printworthy}}}}There are often very good reasons to choose to use Rcat shell rather than using rcats by themselves; these reasons are detailed on its documentation and comparison pages.Example 3– a redirect to an article that has an anchor titled "Anchor this" (see templates {{Anchor}}, {{Visible anchor}}, and {{thế:Anchor comment}}): #REDIRECT [[Xxy Yzz#Anchor this]]{{Redirect category shell|{{R to anchor}}{{R unprintworthy}}}}Example 4– one common redirect need to a geology page titled Xxy Yzz, which uses the R to section rcat to point to the article and section where the common term is defined, and which should be in categories Aaa, Bbb, Ccc and Ddd (the parent article may be sorted to a few more, such as Eee, Fff, etc.), all of which are categories usually found in the parent article. Here is how this example would appear: #REDIRECT [[Xxy Yzz#Section header]] {{Rcat shell|{{R to section}}{{R to related topic}}{{R printworthy}}}}[[Category:Aaa|{{PAGENAME:Xxy Yzz}}]][[Category:Bbb|{{PAGENAME:Xxy Yzz}}]][[Category:Ccc|{{PAGENAME:Xxy Yzz}}]][[Category:Ddd|{{PAGENAME:Xxy Yzz}}]]
|
<nowiki>{{R from...}}, {{R to...}}</nowiki>
, etc., templates have as their main purpose to populate a redirect subcategory (see Thể loại:Wikipedia redirects) to aid in maintenance. A second goal is to help editors with concise explanations for such sortings. Generally speaking, one such template categorizes redirect pages to the subcategory, though that template may be "aliased" by use of several alternative phrasings, themselves redirects to the template. Common alias choices are: other vs. alternative, capitalization vs. capitalisation and other such spelling/phrasing variants like "R to singular" vs. "R from plural" and "R from singular" vs. "R to plural".Thực đơn
Wikipedia:Phân loại trang đổi hướng Làm sao để phân loại đổi hướngLiên quan
Wikipedia:Phản đối SOPA Wikipedia:Phản hồi trải nghiệm của người dùng Wikipedia:Phân loại trang đổi hướng Wikipedia:Phân loại Wikipedia:Phản hồi trải nghiệm của người dùng/Hỏi đáp Wikipedia:Phản hồi Phần mở rộng Di động Wikipedia:Phản hồi trải nghiệm của người dùng/Tính năng mớiTài liệu tham khảo
WikiPedia: Wikipedia:Phân loại trang đổi hướng